# ******************************************************************************************
# 版权所有 2021-2021, 长春理工大学C&I实验室。保留所有权利。
# 文件名：Makefile
# 作者：Wind    版本：V1.0    日期：2021.6.19
# ******************************************************************************************
VERSION = 1.0

CC = arm-himix100-linux-gcc

# ------------------------------------------------------------
# SENSOR_TYPE为工程使用的传感器型号，当前支持IMX307或GC2053
# ------------------------------------------------------------
SENSOR_TYPE = IMX307

DEST = lprogram_7Cv1-RTP

OBJS = main.o \
       L_RTP.o \
       ./mpp40/mpp40_sys.o \
       ./mpp40/mpp40_vi.o \
       ./mpp40/mpp40_venc.o 

LIBS = ./lib_3516ev200/libmpi.a \
       ./lib_3516ev200/libsecurec.a \
       ./lib_3516ev200/libVoiceEngine.a \
       ./lib_3516ev200/libupvqe.a \
       ./lib_3516ev200/libdnvqe.a \
       ./lib_3516ev200/libisp.a \
       ./lib_3516ev200/lib_hidrc.a \
       ./lib_3516ev200/lib_hildci.a \
       ./lib_3516ev200/lib_hidehaze.a \
       ./lib_3516ev200/lib_hiae.a \
       ./lib_3516ev200/lib_hiawb.a

#DEFINE += -DMPP40_OUTPUT_ENABLE 

CFLAGS  = -Wall -std=gnu99 -g -I./mpp40 -I./include_3516ev200 $(DEFINE) 
LDFLAGS = -lpthread -ldl -lm

ifeq ($(SENSOR_TYPE), IMX307)
LIBS   += ./lib_3516ev200/libsns_imx307_2l.a
DEFINE += -DSENSOR_IMX307
endif

ifeq ($(SENSOR_TYPE), GC2053)
LIBS   += ./lib_3516ev200/libsns_gc2053.a
DEFINE += -DSENSOR_GC2053
endif

all:lprogram

lprogram:$(OBJS)
	@$(CC) $(LDFLAGS) -o $(DEST) $(OBJS) $(LIBS) 

$(OBJS):%.o:%.c
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	rm -f *.o
	rm -f ./mpp40/*.o
	rm -f $(DEST)

clear:
	rm -f *.o
	rm -f ./mpp40/*.o
